/****************************************************************************
 *                       Chroma 52912/52914 DC Power Supply
 *---------------------------------------------------------------------------
 *   Copyright (c) National Instruments 1998.  All Rights Reserved.
 *---------------------------------------------------------------------------
 *
 * Title:    chr52912.h
 * Purpose:  Chroma 52912/52914 Programmable DC Power Supply
 *           instrument driver declarations.
 *
 ****************************************************************************/

#ifndef __chr52912_HEADER
#define __chr52912_HEADER

#include <ivi.h>
#include <ividcpwr.h>

#if defined(__cplusplus) || defined(__cplusplus__)
extern "C" {
#endif

typedef struct tagSequencerTable
{
	ViInt32 commandType;
	ViInt32 channelSelect;
	ViReal64 value;		//voltageLevel or currentLimit
	ViInt32 delayUnit;
	ViInt32 delay;
	ViInt32 repeatTimes;
	ViInt32 repeatStartIndex;
} SEQUENCER_TABLE;

typedef struct tagMeasuredData
{
	ViInt32 index;
	ViInt32 measurementDataType;
	ViReal64 measuredValue;
} MEASURED_DATA;

/****************************************************************************
 *----------------- Instrument Driver Revision Information -----------------*
 ****************************************************************************/
#define CHR52912_MAJOR_VERSION                1     /* Instrument driver major version   */
#define CHR52912_MINOR_VERSION                0     /* Instrument driver minor version   */

#define CHR52912_CLASS_SPEC_MAJOR_VERSION     2     /* Class specification major version */
#define CHR52912_CLASS_SPEC_MINOR_VERSION     0     /* Class specification minor version */
#define CHR52912_SUPPORTED_INSTRUMENT_MODELS  "chr52912"
#define CHR52912_DRIVER_VENDOR                "Chroma ATE Inc."
#define CHR52912_DRIVER_DESCRIPTION           "Chroma 52912/52914 Programmable DC Power Supply"

/****************************************************************************
 *------------------------------ Useful Macros -----------------------------*
 ****************************************************************************/

    /*- Defined values for rangeType parameter of function -----------------*/
    /*- ConfigureOutputRange -----------------------------------------------*/
#define CHR52912_VAL_RANGE_CURRENT               IVIDCPWR_VAL_RANGE_CURRENT
#define CHR52912_VAL_RANGE_VOLTAGE               IVIDCPWR_VAL_RANGE_VOLTAGE

    /*- Defined values for outputState parameter of function ---------------*/
    /*- QueryOutputState ---------------------------------------------------*/
#define CHR52912_VAL_OUTPUT_CONSTANT_VOLTAGE     IVIDCPWR_VAL_OUTPUT_CONSTANT_VOLTAGE
#define CHR52912_VAL_OUTPUT_CONSTANT_CURRENT     IVIDCPWR_VAL_OUTPUT_CONSTANT_CURRENT
#define CHR52912_VAL_OUTPUT_OVER_VOLTAGE         IVIDCPWR_VAL_OUTPUT_OVER_VOLTAGE
#define CHR52912_VAL_OUTPUT_OVER_CURRENT         IVIDCPWR_VAL_OUTPUT_OVER_CURRENT
#define CHR52912_VAL_OUTPUT_UNREGULATED          IVIDCPWR_VAL_OUTPUT_UNREGULATED
#define CHR52912_VAL_OUTPUT_OVER_TEMEPRATURE	 IVIDCPWR_VAL_OUTPUT_STATE_SPECIFIC_EXT_BASE

    /*- Defined values for measurementType parameter of function -----------*/
    /*- Measure ------------------------------------------------------------*/
#define CHR52912_VAL_MEASURE_CURRENT             IVIDCPWR_VAL_MEASURE_CURRENT
#define CHR52912_VAL_MEASURE_VOLTAGE             IVIDCPWR_VAL_MEASURE_VOLTAGE

//Defined value for delay unit
#define CHR52912_VAL_DELAY_UNIT_MILLI_SECOND     1
#define CHR52912_VAL_DELAY_UNIT_MICRO_SECOND     2

//Defined value for command type
#define CHR52912_VAL_SET_V                       1
#define CHR52912_VAL_SET_I                       2
#define CHR52912_VAL_OUTPUT_ON                   3
#define CHR52912_VAL_OUTPUT_OFF                  4
#define CHR52912_VAL_DELAY                       5
#define CHR52912_VAL_MEASURE_V                   6
#define CHR52912_VAL_MEASURE_I                   7
#define CHR52912_VAL_REPEAT                      8
#define CHR52912_VAL_NONSTOP_REPEAT              9
#define CHR52912_VAL_END                        10 

//Defined value for channel select
#define CHR52912_VAL_SELECT_CH1					 1
#define CHR52912_VAL_SELECT_CH2					 2
#define CHR52912_VAL_SELECT_CH1_CH2				 3

/****************************************************************************
 *---------------------------- Attribute Defines ---------------------------*
 ****************************************************************************/

    /*- IVI Inherent Instrument Attributes ---------------------------------*/

        /* User Options */
#define CHR52912_ATTR_RANGE_CHECK                   IVI_ATTR_RANGE_CHECK                    /* ViBoolean */
#define CHR52912_ATTR_QUERY_INSTR_STATUS            IVI_ATTR_QUERY_INSTR_STATUS             /* ViBoolean */
#define CHR52912_ATTR_CACHE                         IVI_ATTR_CACHE                          /* ViBoolean */
#define CHR52912_ATTR_SIMULATE                      IVI_ATTR_SIMULATE                       /* ViBoolean */
#define CHR52912_ATTR_RECORD_COERCIONS              IVI_ATTR_RECORD_COERCIONS               /* ViBoolean */

        /* Instrument Capabilities */
#define CHR52912_ATTR_NUM_CHANNELS                  IVI_ATTR_NUM_CHANNELS                   /* ViInt32,  read-only  */

        /* Driver Information  */
#define CHR52912_ATTR_SPECIFIC_DRIVER_PREFIX        IVI_ATTR_SPECIFIC_DRIVER_PREFIX         /* ViString, read-only  */
#define CHR52912_ATTR_SUPPORTED_INSTRUMENT_MODELS   IVI_ATTR_SUPPORTED_INSTRUMENT_MODELS    /* ViString, read-only  */
#define CHR52912_ATTR_GROUP_CAPABILITIES            IVI_ATTR_GROUP_CAPABILITIES             /* ViString, read-only  */
#define CHR52912_ATTR_INSTRUMENT_MANUFACTURER       IVI_ATTR_INSTRUMENT_MANUFACTURER        /* ViString, read-only  */
#define CHR52912_ATTR_INSTRUMENT_MODEL              IVI_ATTR_INSTRUMENT_MODEL               /* ViString, read-only  */
#define CHR52912_ATTR_INSTRUMENT_FIRMWARE_REVISION  IVI_ATTR_INSTRUMENT_FIRMWARE_REVISION   /* ViString, read-only  */
#define CHR52912_ATTR_SPECIFIC_DRIVER_MAJOR_VERSION IVI_ATTR_SPECIFIC_DRIVER_MAJOR_VERSION  /* ViInt32,  read-only  */
#define CHR52912_ATTR_SPECIFIC_DRIVER_MINOR_VERSION IVI_ATTR_SPECIFIC_DRIVER_MINOR_VERSION  /* ViInt32,  read-only  */
#define CHR52912_ATTR_SPECIFIC_DRIVER_REVISION      IVI_ATTR_SPECIFIC_DRIVER_REVISION       /* ViString, read-only  */
#define CHR52912_ATTR_SPECIFIC_DRIVER_VENDOR        IVI_ATTR_SPECIFIC_DRIVER_VENDOR         /* ViString, read-only  */
#define CHR52912_ATTR_SPECIFIC_DRIVER_DESCRIPTION   IVI_ATTR_SPECIFIC_DRIVER_DESCRIPTION    /* ViString, read-only  */
#define CHR52912_ATTR_SPECIFIC_DRIVER_CLASS_SPEC_MAJOR_VERSION IVI_ATTR_SPECIFIC_DRIVER_CLASS_SPEC_MAJOR_VERSION /* ViInt32, read-only */
#define CHR52912_ATTR_SPECIFIC_DRIVER_CLASS_SPEC_MINOR_VERSION IVI_ATTR_SPECIFIC_DRIVER_CLASS_SPEC_MINOR_VERSION /* ViInt32, read-only */

        /* Error Info */
#define CHR52912_ATTR_PRIMARY_ERROR                 IVI_ATTR_PRIMARY_ERROR         /* ViInt32   */
#define CHR52912_ATTR_SECONDARY_ERROR               IVI_ATTR_SECONDARY_ERROR       /* ViInt32   */
#define CHR52912_ATTR_ERROR_ELABORATION             IVI_ATTR_ERROR_ELABORATION     /* ViString  */

        /* Advanced Session Information */
#define CHR52912_ATTR_LOGICAL_NAME                  IVI_ATTR_LOGICAL_NAME          /* ViString, read-only  */
#define CHR52912_ATTR_RESOURCE_DESCRIPTOR           IVI_ATTR_RESOURCE_DESCRIPTOR   /* ViString, read-only  */
#define CHR52912_ATTR_IO_SESSION_TYPE               IVI_ATTR_IO_SESSION_TYPE       /* ViString, read-only  */
#define CHR52912_ATTR_IO_SESSION                    IVI_ATTR_IO_SESSION            /* ViSession, read-only */


    /*- Instrument-Specific Attributes -------------------------------------*/

    /*- Basic Instrument Operations ----------------------------------------*/
#define CHR52912_ATTR_VOLTAGE_LEVEL             IVIDCPWR_ATTR_VOLTAGE_LEVEL           /* ViReal64,  multi-channel, volts */
#define CHR52912_ATTR_OVP_ENABLED               IVIDCPWR_ATTR_OVP_ENABLED             /* ViBoolean, multi-channel        */
#define CHR52912_ATTR_OVP_LIMIT                 IVIDCPWR_ATTR_OVP_LIMIT               /* ViReal64,  multi-channel, volts */
#define CHR52912_ATTR_CURRENT_LIMIT_BEHAVIOR    IVIDCPWR_ATTR_CURRENT_LIMIT_BEHAVIOR  /* ViInt32,   multi-channel        */
#define CHR52912_ATTR_CURRENT_LIMIT             IVIDCPWR_ATTR_CURRENT_LIMIT           /* ViReal64,  multi-channel, amps  */
#define CHR52912_ATTR_OUTPUT_ENABLED            IVIDCPWR_ATTR_OUTPUT_ENABLED          /* ViBoolean, multi-channel        */

    /*- Trigger Attributes -------------------------------------------------*/

#define CHR52912_ATTR_PXI_MANF_ID                 (IVI_SPECIFIC_PUBLIC_ATTR_BASE + 1L)
#define CHR52912_ATTR_PXI_MODEL_CODE              (IVI_SPECIFIC_PUBLIC_ATTR_BASE + 2L)
#define CHR52912_ATTR_IS_RUNNING_SEQUENCER        (IVI_SPECIFIC_PUBLIC_ATTR_BASE + 7L)
#define CHR52912_ATTR_IS_WAITING_TRIGGER_STATE    (IVI_SPECIFIC_PUBLIC_ATTR_BASE + 9L)
#define CHR52912_ATTR_OPERATION_MODE              (IVI_SPECIFIC_PUBLIC_ATTR_BASE + 10L)
#define CHR52912_ATTR_START_TRIGGER_SOURCE        (IVI_SPECIFIC_PUBLIC_ATTR_BASE + 11L)
#define CHR52912_ATTR_STOP_TRIGGER_SOURCE         (IVI_SPECIFIC_PUBLIC_ATTR_BASE + 12L)
#define CHR52912_ATTR_TRIGGER_SLOPE               (IVI_SPECIFIC_PUBLIC_ATTR_BASE + 13L)

/****************************************************************************
 *------------------------ Attribute Value Defines -------------------------*
 ****************************************************************************/
    /*- Defined values for attribute CHR52912_ATTR_CURRENT_LIMIT_BEHAVIOR ---*/
#define CHR52912_VAL_CURRENT_REGULATE           IVIDCPWR_VAL_CURRENT_REGULATE
#define CHR52912_VAL_CURRENT_TRIP               IVIDCPWR_VAL_CURRENT_TRIP

#define CHR52912_VAL_TRIG_NONE                  0
#define CHR52912_VAL_TRIG_EXTERNAL              IVIDCPWR_VAL_TRIG_EXTERNAL
#define CHR52912_VAL_SOFTWARE_TRIG              IVIDCPWR_VAL_SOFTWARE_TRIG
#define CHR52912_VAL_TRIG_TTL0                  IVIDCPWR_VAL_TRIG_TTL0
#define CHR52912_VAL_TRIG_TTL1                  IVIDCPWR_VAL_TRIG_TTL1
#define CHR52912_VAL_TRIG_TTL2                  IVIDCPWR_VAL_TRIG_TTL2
#define CHR52912_VAL_TRIG_TTL3                  IVIDCPWR_VAL_TRIG_TTL3
#define CHR52912_VAL_TRIG_TTL4                  IVIDCPWR_VAL_TRIG_TTL4
#define CHR52912_VAL_TRIG_TTL5                  IVIDCPWR_VAL_TRIG_TTL5
#define CHR52912_VAL_TRIG_TTL6                  IVIDCPWR_VAL_TRIG_TTL6
#define CHR52912_VAL_TRIG_TTL7                  IVIDCPWR_VAL_TRIG_TTL7

#define CHR52912_VAL_DC_POWER                   0
#define CHR52912_VAL_SEQUENCER                  1
#define CHR52912_VAL_MEASURE                    2

#define CHR52912_VAL_POSITIVE                   0
#define CHR52912_VAL_NEGATIVE                   1

/****************************************************************************
 *---------------- Instrument Driver Function Declarations -----------------*
 ****************************************************************************/

    /*- Init and Close Functions -------------------------------------------*/
ViStatus _VI_FUNC  chr52912_init (ViRsrc resourceName, ViBoolean IDQuery,
                                  ViBoolean resetDevice, ViSession *vi);
ViStatus _VI_FUNC  chr52912_InitWithOptions (ViRsrc resourceName, ViBoolean IDQuery,
                                            ViBoolean resetDevice, ViString optionString,
                                            ViSession *newVi);

ViStatus _VI_FUNC  chr52912_close (ViSession vi);

    /*- Coercion Info Functions --------------------------------------------*/
ViStatus _VI_FUNC  chr52912_GetNextCoercionRecord (ViSession vi,
                                                  ViInt32 bufferSize,
                                                  ViChar record[]);

    /*- Locking Functions --------------------------------------------------*/
ViStatus _VI_FUNC  chr52912_LockSession (ViSession vi, ViBoolean *callerHasLock);
ViStatus _VI_FUNC  chr52912_UnlockSession (ViSession vi, ViBoolean *callerHasLock);

    /*- Basic Instrument Operation -----------------------------------------*/
ViStatus _VI_FUNC chr52912_ConfigureOperationMode (ViSession vi,
                                                   ViInt32 operationMode);

ViStatus _VI_FUNC chr52912_ConfigureOutputEnabled (ViSession vi,
                                                  ViConstString channelName,
                                                  ViBoolean enabled);

ViStatus _VI_FUNC chr52912_ConfigureOutputRange (ViSession vi,
                                                ViConstString channelName,
                                                ViInt32 rangeType,
                                                ViReal64 range);

ViStatus _VI_FUNC chr52912_ConfigureCurrentLimit (ViSession vi,
                                                 ViConstString channelName,
                                                 ViInt32 behavior,
                                                 ViReal64 limit);
ViStatus _VI_FUNC chr52912_ConfigureOVP (ViSession vi,
                                        ViConstString channelName,
                                        ViBoolean enabled,
                                        ViReal64 limit);

ViStatus _VI_FUNC chr52912_ConfigureVoltageLevel (ViSession vi,
                                                 ViConstString channelName,
                                                 ViReal64 level);

ViStatus _VI_FUNC chr52912_IsWaitingTrigger (ViSession vi,
                                             ViBoolean *inState);

ViStatus _VI_FUNC chr52912_QueryOutputState (ViSession vi,
                                            ViConstString channelName,
                                            ViInt32 outputState,
                                            ViBoolean* inState);

ViStatus _VI_FUNC chr52912_QueryMaxCurrentLimit (ViSession vi,
                                                 ViConstString channelName,
                                                 ViReal64 voltageLevel,
                                                 ViReal64* maxCurrentLimit);

ViStatus _VI_FUNC chr52912_QueryMaxVoltageLevel (ViSession vi,
                                                 ViConstString channelName,
                                                 ViReal64 currentLimit,
                                                 ViReal64* maxVoltageLevel);

ViStatus _VI_FUNC chr52912_ResetOutputProtection (ViSession vi,
                                                 ViConstString channelName);

    /*- Triggering ---------------------------------------------------------*/
ViStatus _VI_FUNC chr52912_ConfigureTriggerSource (ViSession vi,
                                                   ViInt32 startSource,
                                                   ViInt32 stopSource,
                                                   ViInt32 slope);

ViStatus _VI_FUNC  chr52912_ConfigureTriggeredOutput (ViSession vi,
                                                     ViConstString channelName,
                                                     ViReal64 triggeredLevel,
                                                     ViReal64 triggeredLimit);

ViStatus _VI_FUNC chr52912_ConfigureSequencerTable (ViSession vi,
                                                    ViConstString channelName,
                                                    ViInt32 tableSize,
                                                    const SEQUENCER_TABLE *cmdTable,
                                                    ViInt32 *errorIndex);

ViStatus _VI_FUNC chr52912_ClearSequencerTable (ViSession vi,
                                                ViConstString channelName);

ViStatus _VI_FUNC chr52912_IsRunningSequencer (ViSession vi,
                                               ViConstString channelName,
                                               ViBoolean *isRunning);

ViStatus _VI_FUNC chr52912_ConfigureMeasure (ViSession vi,
                                             ViConstString channelName,
                                             ViReal64 level, ViReal64 limit,
                                             ViInt32 measurementType,
                                             ViInt32 delayTb,
                                             ViInt32 delayTbUnit,
                                             ViInt32 delayTc,
                                             ViInt32 delayTcUnit,
                                             ViInt32 delayTe,
                                             ViInt32 delayTeUnit,
                                             ViInt32 measureCount);

ViStatus _VI_FUNC chr52912_Abort (ViSession vi);

ViStatus _VI_FUNC chr52912_Initiate (ViSession vi, ViInt32 channelSelect);

    /*- Software Triggering ------------------------------------------------*/
ViStatus _VI_FUNC chr52912_SendSoftwareTrigger (ViSession vi);

    /*- Measuring ----------------------------------------------------------*/
ViStatus _VI_FUNC chr52912_Measure (ViSession vi,
                                   ViConstString channelName,
                                   ViInt32 measurementType,
                                   ViReal64* measurement);

ViStatus _VI_FUNC chr52912_ReadMeasuredData (ViSession vi,
                                             ViConstString channelName,
                                             ViInt32 *numOfData,
                                             MEASURED_DATA measuredData[]);

	/*********************************************************
		Device access function
	 *********************************************************/

    /*- Error Functions ----------------------------------------------------*/
ViStatus _VI_FUNC  chr52912_error_query (ViSession vi, ViInt32 *errorCode,
                                         ViChar errorMessage[]);
ViStatus _VI_FUNC  chr52912_GetErrorInfo (ViSession vi, ViStatus *primaryError,
                                          ViStatus *secondaryError,
                                          ViChar errorElaboration[256]);
ViStatus _VI_FUNC  chr52912_ClearErrorInfo (ViSession vi);
ViStatus _VI_FUNC  chr52912_error_message (ViSession vi, ViStatus errorCode,
                                           ViChar errorMessage[256]);

    /*- Utility Functions --------------------------------------------------*/
ViStatus _VI_FUNC  chr52912_reset (ViSession vi);
ViStatus _VI_FUNC  chr52912_self_test (ViSession vi, ViInt16 *selfTestResult,
                                       ViChar selfTestMessage[]);
ViStatus _VI_FUNC  chr52912_revision_query (ViSession vi,
                                            ViChar instrumentDriverRevision[],
                                            ViChar firmwareRevision[]);
ViStatus _VI_FUNC  chr52912_QueryCalibrationDate (ViSession instrumentHandle,
                                                  ViChar CalDate[]);
ViStatus _VI_FUNC chr52912_QueryDeviceInfo (ViSession instrumentHandle,
                                            ViChar modelName[16],
                                            ViChar serialNumber[16],
                                            ViChar firmwareVer[8],
                                            ViChar hardwareVer[8]);
    /*- Set, Get, and Check Attribute Functions ----------------------------*/
ViStatus _VI_FUNC  chr52912_GetAttributeViInt32 (ViSession vi, ViConstString channelName, ViAttr attribute, ViInt32 *value);
ViStatus _VI_FUNC  chr52912_GetAttributeViReal64 (ViSession vi, ViConstString channelName, ViAttr attribute, ViReal64 *value);
ViStatus _VI_FUNC  chr52912_GetAttributeViString (ViSession vi, ViConstString channelName, ViAttr attribute, ViInt32 bufSize, ViChar value[]);
ViStatus _VI_FUNC  chr52912_GetAttributeViSession (ViSession vi, ViConstString channelName, ViAttr attribute, ViSession *value);
ViStatus _VI_FUNC  chr52912_GetAttributeViBoolean (ViSession vi, ViConstString channelName, ViAttr attribute, ViBoolean *value);

ViStatus _VI_FUNC  chr52912_SetAttributeViInt32 (ViSession vi, ViConstString channelName, ViAttr attribute, ViInt32 value);
ViStatus _VI_FUNC  chr52912_SetAttributeViReal64 (ViSession vi, ViConstString channelName, ViAttr attribute, ViReal64 value);
ViStatus _VI_FUNC  chr52912_SetAttributeViString (ViSession vi, ViConstString channelName, ViAttr attribute, ViConstString value);
ViStatus _VI_FUNC  chr52912_SetAttributeViSession (ViSession vi, ViConstString channelName, ViAttr attribute, ViSession value);
ViStatus _VI_FUNC  chr52912_SetAttributeViBoolean (ViSession vi, ViConstString channelName, ViAttr attribute, ViBoolean value);

ViStatus _VI_FUNC  chr52912_CheckAttributeViInt32 (ViSession vi, ViConstString channelName, ViAttr attribute, ViInt32 value);
ViStatus _VI_FUNC  chr52912_CheckAttributeViReal64 (ViSession vi, ViConstString channelName, ViAttr attribute, ViReal64 value);
ViStatus _VI_FUNC  chr52912_CheckAttributeViString (ViSession vi, ViConstString channelName, ViAttr attribute, ViConstString value);
ViStatus _VI_FUNC  chr52912_CheckAttributeViSession (ViSession vi, ViConstString channelName, ViAttr attribute, ViSession value);
ViStatus _VI_FUNC  chr52912_CheckAttributeViBoolean (ViSession vi, ViConstString channelName, ViAttr attribute, ViBoolean value);

    /*********************************************************
        Functions reserved for class driver use only.
        End-users should not call these functions.
     *********************************************************/
ViStatus _VI_FUNC  chr52912_IviInit (ViRsrc resourceName, ViBoolean IDQuery,
                                     ViBoolean reset, ViSession vi);
ViStatus _VI_FUNC  chr52912_IviClose (ViSession vi);


/****************************************************************************
 *------------------------ Warn And Completion Codes -----------------------*
 ****************************************************************************/
#define CHR52912_WARN_CALIBRATION_EXPIRE   (IVI_SPECIFIC_WARN_BASE + 1)
#define CHR52912_WARN_NOT_SUPPORT          (IVI_SPECIFIC_WARN_BASE + 2)


/****************************************************************************
 *------------------------ Error And Completion Codes ----------------------*
 ****************************************************************************/
#define CHR52912_ERROR_TRIGGER_NOT_SOFTWARE         IVIDCPWR_ERROR_TRIGGER_NOT_SOFTWARE
#define CHR52912_ERROR_CH1_INIT_FAIL                 (IVI_SPECIFIC_ERROR_BASE + 1)
#define CHR52912_ERROR_CH2_INIT_FAIL                 (IVI_SPECIFIC_ERROR_BASE + 2)
#define CHR52912_ERROR_INIT_FAIL                     (IVI_SPECIFIC_ERROR_BASE + 3)
#define CHR52912_ERROR_EXCEED_POWER_LIMIT            (IVI_SPECIFIC_ERROR_BASE + 4)
#define CHR52912_ERROR_NO_INPUT                      (IVI_SPECIFIC_ERROR_BASE + 5)
#define CHR52912_ERROR_UNSTABLE_INPUT                (IVI_SPECIFIC_ERROR_BASE + 6)
#define CHR52912_ERROR_INVALID_OPERATION_MODE        (IVI_SPECIFIC_ERROR_BASE + 7)
#define CHR52912_ERROR_INVALID_COMMAND_TYPE          (IVI_SPECIFIC_ERROR_BASE + 8)
#define CHR52912_ERROR_INVALID_CH_SELECT             (IVI_SPECIFIC_ERROR_BASE + 9)
#define CHR52912_ERROR_INVALID_VOLTAGE_RANGE         (IVI_SPECIFIC_ERROR_BASE + 10)
#define CHR52912_ERROR_INVALID_CURRENT_RANGE         (IVI_SPECIFIC_ERROR_BASE + 11)
#define CHR52912_ERROR_INVALID_DELAY                 (IVI_SPECIFIC_ERROR_BASE + 12)
#define CHR52912_ERROR_INVALID_REPEAT_TIMES          (IVI_SPECIFIC_ERROR_BASE + 13)
#define CHR52912_ERROR_REPEAT_INDEX                  (IVI_SPECIFIC_ERROR_BASE + 14)
#define CHR52912_ERROR_EXCEED_REPEAT_NEST_LIMIT      (IVI_SPECIFIC_ERROR_BASE + 15)
#define CHR52912_ERROR_NO_END_COMMAND                (IVI_SPECIFIC_ERROR_BASE + 16)
#define CHR52912_ERROR_NOT_SET_V_I_BEFORE_OUTPUT_ON  (IVI_SPECIFIC_ERROR_BASE + 17)
#define CHR52912_ERROR_TABLE2_SELECT_CH1             (IVI_SPECIFIC_ERROR_BASE + 18)
#define CHR52912_ERROR_TABLE_EMPTY                   (IVI_SPECIFIC_ERROR_BASE + 19)
#define CHR52912_ERROR_TABLE_UNUSABLE                (IVI_SPECIFIC_ERROR_BASE + 20)
#define CHR52912_ERROR_RUNNING_SEQUENCER             (IVI_SPECIFIC_ERROR_BASE + 21)
#define CHR52912_ERROR_NOT_WAITING_TRIGGER           (IVI_SPECIFIC_ERROR_BASE + 22)
#define CHR52912_ERROR_WAITING_TRIGGER               (IVI_SPECIFIC_ERROR_BASE + 23)
#define CHR52912_ERROR_INVALID_TRIGGER               (IVI_SPECIFIC_ERROR_BASE + 24)
#define CHR52912_ERROR_NO_MEASURED_DATA              (IVI_SPECIFIC_ERROR_BASE + 25)
#define CHR52912_ERROR                               (IVI_SPECIFIC_ERROR_BASE + 97)

/****************************************************************************
 *---------------------------- End Include File ----------------------------*
 ****************************************************************************/
#if defined(__cplusplus) || defined(__cplusplus__)
}
#endif
#endif /* __chr52912_HEADER */




